{
    "dataset_reader": {
        "class_name": "conll2003_reader",
        "data_path": "{DOWNLOADS_PATH}/conll2003/",
        "dataset_name": "conll2003",
        "provide_pos": false
    },
    "dataset_iterator": {
        "class_name": "data_learning_iterator"
    },
    "chainer": {
        "in": [
            "x"
        ],
        "in_y": [
            "y"
        ],
        "pipe": [
            {
                "class_name": "torch_transformers_ner_preprocessor",
                "vocab_file": "{TRANSFORMER}",
                "do_lower_case": false,
                "max_seq_length": 512,
                "max_subword_length": 15,
                "token_masking_prob": 0.0,
                "in": [
                    "x"
                ],
                "out": [
                    "x_tokens",
                    "x_subword_tokens",
                    "x_subword_tok_ids",
                    "startofword_markers",
                    "attention_mask"
                ]
            },
            {
                "id": "tag_vocab",
                "class_name": "simple_vocab",
                "unk_token": [
                    "O"
                ],
                "pad_with_zeros": true,
                "save_path": "{MODEL_PATH}/tag.dict",
                "load_path": "{MODEL_PATH}/tag.dict",
                "fit_on": [
                    "y"
                ],
                "in": [
                    "y"
                ],
                "out": [
                    "y_ind"
                ]
            },
            {
                "class_name": "torch_transformers_sequence_tagger",
                "n_tags": "#tag_vocab.len",
                "pretrained_bert": "{TRANSFORMER}",
                "attention_probs_keep_prob": 0.5,
                "return_probas": false,
                "use_crf": true,
                "encoder_layer_ids": [
                    -1
                ],
                "optimizer": "AdamW",
                "optimizer_parameters": {
                    "lr": 2e-05,
                    "weight_decay": 1e-06,
                    "betas": [
                        0.9,
                        0.999
                    ],
                    "eps": 1e-06
                },
                "clip_norm": 1.0,
                "min_learning_rate": 1e-07,
                "learning_rate_drop_patience": 20,
                "learning_rate_drop_div": 1.5,
                "load_before_drop": true,
                "save_path": "{MODEL_PATH}/model",
                "load_path": "{MODEL_PATH}/model",
                "in": [
                    "x_subword_tok_ids",
                    "attention_mask",
                    "startofword_markers"
                ],
                "in_y": [
                    "y_ind"
                ],
                "out": [
                    "y_pred_ind",
                    "probas"
                ]
            },
            {
                "ref": "tag_vocab",
                "in": [
                    "y_pred_ind"
                ],
                "out": [
                    "y_pred"
                ]
            }
        ],
        "out": [
            "x_tokens",
            "y_pred"
        ]
    },
    "train": {
        "epochs": 50,
        "batch_size": 150,
        "metrics": [
            {
                "name": "ner_f1",
                "inputs": [
                    "y",
                    "y_pred"
                ]
            },
            {
                "name": "ner_token_f1",
                "inputs": [
                    "y",
                    "y_pred"
                ]
            }
        ],
        "validation_patience": 100,
        "val_every_n_batches": 50,
        "log_every_n_batches": 50,
        "show_examples": false,
        "pytest_max_batches": 2,
        "pytest_batch_size": 8,
        "evaluation_targets": [
            "test"
        ],
        "class_name": "torch_trainer"
    },
    "metadata": {
        "variables": {
            "ROOT_PATH": "~/.deeppavlov",
            "DOWNLOADS_PATH": "~/.deeppavlov/downloads",
            "MODELS_PATH": "~/.deeppavlov/models",
            "TRANSFORMER": "distilbert-base-multilingual-cased",
            "MODEL_PATH": "{MODELS_PATH}/ner/mbert_dream_distil_with_numbers_rus_ext"
        },
        "download": [
            {
                "url": "http://files.deeppavlov.ai/v1/ner/mbert_dream_distil_with_numbers.tar.gz",
                "subdir": "{MODEL_PATH}"
            }
        ]
    }
}
